﻿<%@ Page Title="Bewerk Tickettypesperfestival" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Tickettypesperfestival.aspx.cs" Inherits="WebApplication2.EditPages.Tickettypesperfestival" %>
<asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">
    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
                <h1><%: Title %>.</h1>
                <h2>Groep16 - Festivalinfo</h2>
            </hgroup>
            <p>
                Hier kan je de gegevens van de tabel Tickettypesperfestival bewerken.
            </p>
        </div>
    </section>
</asp:Content>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="fest_id,typ_id" DataSourceID="SqlDataSource1" AutoGenerateEditButton="True" AutoGenerateDeleteButton="True" OnRowEditing="GridView1_RowEditing" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowUpdating="GridView1_RowUpdating" OnRowDeleting="GridView1_RowDeleting">
        <Columns>
            <asp:BoundField DataField="fest_id" HeaderText="festId" ReadOnly="True" SortExpression="fest_id" />
            <asp:BoundField DataField="typ_id" HeaderText="typId" ReadOnly="True" SortExpression="typ_id" />
            <asp:BoundField DataField="aantal" HeaderText="aantal" SortExpression="aantal" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:groep16_festivalsConnectionString %>" SelectCommand="SELECT * FROM [tickettypesperfestival]" DeleteCommand="DELETE FROM [tickettypesperfestival] WHERE [fest_id] = @fest_id AND [typ_id] = @typ_id" InsertCommand="INSERT INTO [tickettypesperfestival] ([fest_id], [typ_id], [aantal]) VALUES (@fest_id, @typ_id, @aantal)" UpdateCommand="UPDATE [tickettypesperfestival] SET [aantal] = @aantal WHERE [fest_id] = @fest_id AND [typ_id] = @typ_id">
        <DeleteParameters>
            <asp:Parameter Name="fest_id" Type="Int32" />
            <asp:Parameter Name="typ_id" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="fest_id" Type="Int32" />
            <asp:Parameter Name="typ_id" Type="Int32" />
            <asp:Parameter Name="aantal" Type="Int32" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="aantal" Type="Int32" />
            <asp:Parameter Name="fest_id" Type="Int32" />
            <asp:Parameter Name="typ_id" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>

</asp:Content>